# ---------------------------------------------
# the first plan
import cv2

def main():
    img = cv2.imread('3/lena_color.jpg')
    
    img1 = cv2.flip(img, -4)
    img2 = cv2.flip(img, -3)
    img3 = cv2.flip(img, -2)
    img4 = cv2.flip(img, -1)
    img5 = cv2.flip(img, 0)
    img6 = cv2.flip(img, 1)
    img7 = cv2.flip(img, 2)
    img8 = cv2.flip(img, 3)
    img9 = cv2.flip(img, 4)

    cv2.imshow('img', img)
    cv2.imshow('img1', img1)
    cv2.imshow('img2', img2)
    cv2.imshow('img3', img3)
    cv2.imshow('img4', img4)
    cv2.imshow('img5', img5)
    cv2.imshow('img6', img6)
    cv2.imshow('img7', img7)
    cv2.imshow('img8', img8)
    cv2.imshow('img9', img9)

    cv2.waitKey(0)
    cv2.destroyAllWindows()

if __name__ == '__main__':
    main()

# ---------------------------------------------
# the second plan
import cv2

def main():
    img = cv2.imread('3/lena_color.jpg')

    for i in range(-4, 5):
        img1 = cv2.flip(img, i)
        cv2.imshow('img', img)
        cv2.imshow('img1', img1)
        cv2.waitKey(0)
        cv2.destroyAllWindows()

if __name__ == '__main__':
    main()